<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file="../../currency/layer.html" %>
<script type="text/javascript">
var rId="${rId}";
var pGrade = "1";
function initPower(mGrade){
	if(mGrade){
		pGrade=mGrade;
	}
	var param = {
			rId:rId,
			mGrade:pGrade
	}
	_linwq_ajax("/role/role2mune.action",param,'html',function(data){
		$("#tabC").html(data);
	});
}
$(function(){
	initPower();
});
function addMune(mId){
	var param={
			mGrade:pGrade,
			rId:rId,
			mId:mId
	}
	_linwq_ajax("/role/roleAddmune.action",param,'text',function(data){
		console.info(data);
		if(data=='success'){
			initPower();
		}else{
			layer.msg("请先添加该菜单的父级菜单（"+ data +"）！",{icon: 2});
		}
	});
}
function delMune(mId){
	var param={
			mGrade:pGrade,
			rId:rId,
			mId:mId
	}
	_linwq_ajax("/role/roleDelmune.action",param,'text',function(data){
		console.info(data);
		if(data=='success'){
			initPower();
		}else{
			layer.msg("请先删除该菜单的子级菜单（"+ data +"）！",{icon: 2});
		}
	});
}
</script>
<div class="panel panel-default">
	<!--<div class="panel-hd">按钮</div>-->
	<div class="panel-bd">
		<div class="card">
			<div class="card-header">
				<!-- <div class="tab-title fl">
					<strong class="title">Tab选项卡标题</strong>
				</div> -->
				<ul class="tab-nav fl">
					<li class="active" onclick="initPower(1)">今日新闻</li>
					<li onclick="initPower(2)">陕西新闻</li>
				</ul>
			</div>
			<div class="tab-cont" id="tabC" style="display: block;">
				
			</div>
		</div>
	</div>
</div>